#/usr/bin/env python
# -*- coding: utf8 -*-
# title       :
# description :
# author      :'ShenMeng'

import maya.cmds as cmds

class Validation(object):
    name = u'UnknownNode | 未知节点检查'
    order = 90
    dataDict = dict()
    def execute(self):
        self.dataDict = {}
        typeList = ['unknown', 'unknownDag', 'unknownTransform']
        for type in typeList:
            unknownNodeList = cmds.ls(type=type)
            if unknownNodeList:
                self.dataDict[type] = unknownNodeList
        return self.dataDict

    def correct(self):
        cmds.delete(cmds.ls(type=['unknown', 'unknownDag', 'unknownTransform']))

    def search(self, obj):
        cmds.select(cmds.ls(type=obj))